package com.zds.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @className:AccountMapper
 * @date: 2024/12/24 下午8:35
 * @description:
 */
public interface AccountMapper {
    /**
     * 加钱
     * @param accountname
     * @param money
     */
    @Update("update account set money=money+#{money} where accountname = #{accountname}")
    public void updateincr(@Param("accountname") String accountname,@Param("money") Integer money);

    /**
     * 减钱
     * @param accountname
     * @param money
     */
    @Update("update account set money=money-#{money} where accountname = #{accountname}")
    public void updatedecr(@Param("accountname") String accountname,@Param("money") Integer money);
}
